interface Person {
    name: string,
    friend?: {
        name: string,
        age?: number,
        girlFriend?: {
            name: string
        }
    }
}

let obj: Person = {
    name: "哈哈",
    friend: {
        name: "xixi"
    }
}

console.log(obj.name)
console.log(obj.friend?.name)
console.log(obj.friend?.girlFriend?.name)